package com.ruoyi.system.service.impl;

import com.ruoyi.common.annotation.DataScope;
import com.ruoyi.common.core.text.Convert;
import com.ruoyi.system.domain.JiajiaWorkerTixian;
import com.ruoyi.system.mapper.JiajiaWorkerTixianMapper;
import com.ruoyi.system.service.IJiajiaWorkerTixianService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 社工提现Service业务层处理
 * 
 * @author knd
 * @date 2021-11-02
 */
@Service
public class JiajiaWorkerTixianServiceImpl implements IJiajiaWorkerTixianService
{
    @Autowired
    private JiajiaWorkerTixianMapper jiajiaWorkerTixianMapper;

    /**
     * 查询社工提现
     * 
     * @param id 社工提现主键
     * @return 社工提现
     */
    @Override
    public JiajiaWorkerTixian selectJiajiaWorkerTixianById(Long id)
    {
        return jiajiaWorkerTixianMapper.selectJiajiaWorkerTixianById(id);
    }

    /**
     * 查询社工提现列表
     * 
     * @param jiajiaWorkerTixian 社工提现
     * @return 社工提现
     */
    @Override
    @DataScope(deptAlias  ="d")
    public List<JiajiaWorkerTixian> selectJiajiaWorkerTixianList(JiajiaWorkerTixian jiajiaWorkerTixian)
    {
        return jiajiaWorkerTixianMapper.selectJiajiaWorkerTixianList(jiajiaWorkerTixian);
    }

    /**
     * 新增社工提现
     * 
     * @param jiajiaWorkerTixian 社工提现
     * @return 结果
     */
    @Override
    public int insertJiajiaWorkerTixian(JiajiaWorkerTixian jiajiaWorkerTixian)
    {
        return jiajiaWorkerTixianMapper.insertJiajiaWorkerTixian(jiajiaWorkerTixian);
    }

    /**
     * 修改社工提现
     * 
     * @param jiajiaWorkerTixian 社工提现
     * @return 结果
     */
    @Override
    public int updateJiajiaWorkerTixian(JiajiaWorkerTixian jiajiaWorkerTixian)
    {
        return jiajiaWorkerTixianMapper.updateJiajiaWorkerTixian(jiajiaWorkerTixian);
    }

    /**
     * 批量删除社工提现
     * 
     * @param ids 需要删除的社工提现主键
     * @return 结果
     */
    @Override
    public int deleteJiajiaWorkerTixianByIds(String ids)
    {
        return jiajiaWorkerTixianMapper.deleteJiajiaWorkerTixianByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除社工提现信息
     * 
     * @param id 社工提现主键
     * @return 结果
     */
    @Override
    public int deleteJiajiaWorkerTixianById(Long id)
    {
        return jiajiaWorkerTixianMapper.deleteJiajiaWorkerTixianById(id);
    }
}
